/**
 * @file SetMoodHandler.cs
 * @author Zane Mayo
 * @date 26/5/2009
 */

using System;

namespace MxitAPI {
	
	
	public class SetMoodHandler : Handler {
		
		private static log4net.ILog log = log4net.LogManager.GetLogger( System.Reflection.MethodBase.GetCurrentMethod().DeclaringType );
		
		private Mood mood;
		
		public SetMoodHandler() : base( typeof( SetMoodProtocolMessage ) )  {			
		}
		
		public SetMoodHandler( Mood mood ) : this()  {
			this.mood = mood;
		}
		
		public override ProtocolMessage CreateRequestProtocolMessage() {
			SetMoodProtocolMessage protocolMessage = new SetMoodProtocolMessage();
			protocolMessage.Mood = mood;
			
			// Todo Maybe only set on response
			UserProfile.Instance.Mood = mood;
			
			return protocolMessage;
		}

		
	}
}